
import java.io.*;
public class InputStreamDemo {
	
	public static void main(String[] args) throws IOException{
		InputStream in=new FileInputStream("D:\\workspace\\JavaProExample10\\src\\1.txt");
		byte[] b =new byte[1024];
		int len = 0;
		while((len=in.read(b)) != -1){
				System.out.println(new String(b));
				System.out.println("1");
			
		}
		byte[] f =new byte[1024];
		int c=0;
		while ((c=in.read(b)) != -1){
			System.out.println(new String(b));
			System.out.println("2");
		}
		in.close();
	}

}
